Ordering
Ordering[list] gives the positions in list at which each successive element of Sort[list] appears.
Ordering[list,n] gives the positions in list at which the first n elements of Sort[list] appear.
Ordering[list,-n] gives the positions of the last n elements of Sort[list].
Ordering[list,n,p] gives positions in list of elements of Sort[list,p].
Please visit the official Wolfram Language Reference for more details and examples on core symbols.